/**
 * 生成设置项生成插件
 */
(function ($) {
    $.fn.autoGenerateSetting = function (items) {
        let separator = ":";
        let defaultItem = {label: '输入', tag: 'input', className: 'easyui-textbox', dataOptions: ''};
        $(this).append((function () {
            let count = 1;
            let inputItem = ''
            for (let i of items) {
                inputItem += `<div>
                <label>${i.label ? (i.label + separator) : (defaultItem.label + (count++) + separator)}</label>
                <input class="${i.className ? i.className : defaultItem.className}" 
                data-options="${i.dataOptions ? i.dataOptions : ''}">
                </div>`;
            }
            return inputItem;
        })())
        $.parser.parse($(this))
    }
})(jQuery)